Our hedgehog doesn't have any stars to collect. Let's add some!

  • Drag out Interval Event from . Delete the .turn_left() command.
  • Go to and drag out a Star. Drop it inside the interval event.
  • Change the shape's name to goal_star.
  • Make goal_star's radius 15. Change its color to "yellow".

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("moon") sprite = codesters.Sprite("hedgehog") sprite.go_to(0, -210) def left(): sprite.turn_left(20) stage.event_left_key(left) def right(): sprite.turn_right(20) stage.event_right_key(right) def up(): sprite.move_forward(575) stage.wait(0.1) sprite.go_to(0, -210) stage.event_up_key(up)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)